//
//  FighterPrototypeParser.h
//  airfight
//
//  Created by aaron more on 12-8-28.
//  Copyright (c) 2012年 moonriver. All rights reserved.
//

#ifndef airfight_FighterPrototypeParser_h
#define airfight_FighterPrototypeParser_h

#include "cocos2d.h"
#include "BaseXMLParser.h"
#include "FighterPrototypes.h"
#include "Fighter.h"
#include "Bullet.h"

USING_NS_CC;

enum {
    FighterPrototypeNone,
    FighterPrototypeFighter,
    FighterPrototypeBullet
};

class FighterPrototypeParser : public BaseXMLParser
{
private:
    std::string startXMLElement;
    std::string endXMLElement;
    std::string currentString;
    bool isStart;
    Fighter* currentFighter;
    
public:
    FighterPrototypes* prototypes;
    
public:
    FighterPrototypeParser();
    virtual ~FighterPrototypeParser();
    static FighterPrototypeParser * formatWithXMLFile(const char *xmlFile);
    virtual void internalInit(const char* tmxFileName);
    
    virtual void startElement(void *ctx, const char *name, const char **atts);
    virtual void endElement(void *ctx, const char *name);
    virtual void textHandler(void *ctx, const char *s, int len);
    
};


#endif
